﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;

namespace Com.JunCaiSoft.Common.IDao
{
    public interface IDeleteDaoAsync<T> : IDataCoreAccessObjectAsync where T : class, new()
    {
        Task<int> DeleteAsync(object id);
        Task<int> DeleteAsync(T t);
        Task<int> DeleteListAsync(Expression<Func<T, bool>> where);
        Task<int> DeleteListAsync(List<T> deleteList);

        Task<int> DeleteAsync<TEntity>(object id) where TEntity : class, new();
        Task<int> DeleteAsync<TEntity>(TEntity t) where TEntity : class, new();
        Task<int> DeleteListAsync<TEntity>(Expression<Func<TEntity, bool>> where) where TEntity : class, new();
        Task<int> DeleteListAsync<TEntity>(List<TEntity> deleteList) where TEntity : class, new();
    }
}
